from PyQt5 import QtWidgets
from PyQt5 import QtCore
from PyQt5 import QtGui

import sys

class QPixmapText(QtWidgets.QWidget):
    def __init__(self, parent=None):
        super(QPixmapText, self).__init__(parent)

        self.setWindowTitle("QPixmapText例子")

        self.label = QtWidgets.QLabel()
        self.label.setPixmap(QtGui.QPixmap("python.jpg"))
        vbox = QtWidgets.QVBoxLayout()
        vbox.addWidget(self.label)

        self.setLayout(vbox)

if __name__ == '__main__':
    app = QtWidgets.QApplication(sys.argv)
    QtWidgets.QApplication.setStyle("Fusion")
    win = QPixmapText()
    win.show()
    sys.exit(app.exec_())